define(function(require, exports, module){
	var highGrid = require('@base/highGrid');
	var util     = require('util');
	var $        = require("jquery");

	var Grid = highGrid.base.extend({
		init: function(config){
			config = pubjs.conf(config,{
				'url': 'monitor/noticeList',
				'hasRefresh': false,
				'hasExport': false,
				'hasWordsSearch': true,
				'hasBatch': true,
				'hasFilter': true,
				'hasTab': false,
				'hasAmount': false,
				'hasSelect': true,
				'reqType': 'websocket',
				'cols': [
					{'name': "_id", text: LANG("序号"), sort: true, align: 'center',width: 60},
					{'name': "Title", text: LANG("标题"), sort: false, align: 'left',width: 650, render: 'renderTitle'},
					{'name': "CreateTime", text: LANG("发布时间"), sort: false, align: 'center',width: 150, render: 'renderTime' }
				],
				'param': {
					order: 'CreateTime|-1'
				},
			});
			this.Super('init', arguments);
		},
		renderTitle: function(i, val, row, con){
			var title = $('<a href = "#admin/messageMonitor/detail/'+ row["_id"]  + '">' + val +'</a>')
			return title;
		},
		renderTime: function(i, val, row, con){
			return util.date("Y-m-d H:i:s",val);
		}
	});

	exports.base = Grid;
});